#include<stdio.h>
int main()
{
	int x,y;
	printf("x=");
	scanf("%d",x);
	if(x<=100000)
	   {
	     y=x*0.1;
	     printf("%d",y);
   }
	else if(x>100000&&x<=200000)
	{
	  y=100000*0.1+(x-100000)*0.075;
	  printf("%d",y);
   }   
	else if(x>200000&&x<=400000)
	{
	  y=100000*0.1+100000*0.075+(x-200000)*0.05;
	  printf("%d",y);
    } 
	else if(x>400000&&x<=600000)
	{
	  y=100000*0.1+100000*0.075+200000*0.05+(x-400000)*0.03;
	  printf("%d",y);
    }
	else if(x>600000&&x<=1000000)
   {
	  y=100000*0.1+100000*0.075+200000*0.05+200000*0.03+(x-600000)*0.015;
	  printf("%d",y);
   }
   else if(x>1000000)
   {
      y=100000*0.1+100000*0.075+200000*0.05+200000*0.03+400000*0.015+(x-1000000)*0.01;
      printf("%d",y);
  }
      return 0;
}
